home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / SHELLS / SZ2 / APROGRAM.DOC < prev    next >
Text File  |  1992-08-31  |  4KB  |  113 lines

  1.                           ******************
  2.                           GENERATED PROGRAMS
  3.                           ******************
  4.  
  5. To get a better understanding of why & how SHAZAM organizes program
  6. files, take a look at the diagrams below.  Note how SHAZAM's main
  7. screen simulates file organization of these elements.  (You can
  8. control whether files are loaded using the SETUP|IDE dialog.)
  9.  
  10.       Organizing Software          | Example SHAZAM screen
  11.  ----------------------------------+----------------------
  12.  ┌──────┐┌─────────┐┌────────┐     | ┌─INC─┐┌─VIR─┐┌─EVT─┐
  13.  │ CODE ││         ││        │     | │     ││     ││     │
  14.  │  &   ││ METHODS ││ EVENTS │     | │    ┌───TXT───┐    │
  15.  │ DATA ││         ││        │     | └────│         │────┘
  16.  └───┬──┘└─────┬───┘└───┬────┘     | ╔════════DEF════════╗
  17.      └─────────┼────────┘          | ║                   ║
  18.         ╔══════╧══════╗            | ║                   ║
  19.         ║ APPLICATION ║            | ╚═══════════════════╝
  20.         ╟─────────────╢            |  (dialogs not shown)
  21.         ║   DIALOGS   ║            |
  22.         ╟─────────────╢            |
  23.         ║    HELP     ║            |
  24.         ╚══════╤══════╝            |
  25.           ▐▀▀▀▀▀▀▀▀▀▌              |
  26.           ▐ PROGRAM ▌              |
  27.           ▐▄▄▄▄▄▄▄▄▄▌              |
  28.  ---------------------------------------------------------
  29.    Program             *.EXE - Executable file
  30.    Overlays            *.OVR - Code
  31.    Resources           *.REZ - Visible "FrameWork"
  32.    Help                *.HLP - Information
  33.    Initialization    *_I.TPU - startup overlays, resources & memory
  34.    Program           *_U.TPU - main procedure (unitized)
  35.    Child Processes     *.$$$ - Swapfile (best when unitized)
  36.  
  37.  
  38. All Turbo Vision software has, or can have, these elements in common.
  39. SHAZAM makes it easy for you to use, or not to use, a particular one.
  40.  
  41. Suppose you decide to overlay a program.  Normally, you'd have to
  42. make a list of UNITS which can be overlaid, create overlay startup
  43. code, check for the presence of the *.OVR file, etc.
  44.  
  45. It's a just a little easier to do this...
  46.  
  47.     C:>shazam myprog/m/o+
  48.  
  49. ...to re-generate and re-compile an overlaid version, or this...
  50.  
  51.     C:>shazam myprog/m/o-
  52.  
  53. ...for a NON-overlaid version.
  54.  
  55.  
  56. Likewise, suppose you decide to get into resources.  Now, if you
  57. start making changes to cmXX and hcXX, you're talking WORK.  That's
  58. because the resource, once generated, has the OLD values you used.
  59. If you change Help Text, or a cmXX symbol, the main program has the
  60. new value but the RESOURCE DOES NOT!
  61.  
  62. It might just be easier to do this...
  63.  
  64.     C:>shazam myprog/m/2
  65.  
  66. ...for a resource version, and this...
  67.  
  68.     C:>shazam myprog/m/1
  69.  
  70. ...to get back to the code version.
  71.  
  72. Using SHAZAM, you can be assured that resource and program symbols
  73. are synchronized, since everything is freshly generated, including
  74. dialogs.  hcXX symbols for resourced dialogs (*.DLG) are
  75. automatically updated by SHAZAM during the generate process.
  76.  
  77. You may run into problems (such as logic bugs) when switching from a
  78. "code" to a "resourced" program.  With SHAZAM, you can quickly
  79. re-generate the program either way.  ("I didn't have that bug before
  80. using resources!")
  81.  
  82.  
  83.  
  84.                            ***************
  85.                            GENERATED UNITS
  86.                            ***************
  87.  
  88. Your program and its units can use the Initialization and Help
  89. Symbols units.  This way, you can let SHAZAM and the Help Compiler
  90. create all cmXX, hcXX and kbCtrl? symbols needed by the program.
  91. (You can reserve symbols names using the [ INTERNAL ] and [ VALUE ]
  92. keywords.)
  93.  
  94.  
  95. SAMPLE_I.PAS - Initialization unit
  96. ------------
  97. Contains the cmXX and kbCtrl? symbols.  In addition, startup code for
  98. resources and overlays (if used) is in this unit.  It may not be
  99. overlaid.  This unit is generated for each program.
  100.  
  101.  
  102. SAMPLE_X.PAS - Help Symbols unit
  103. ------------
  104. Help Context symbols, created by Help Compiler.
  105.  
  106.  
  107. SAMPLE_U.PAS - Program unit (encapsulated)
  108. ------------
  109. For Swap-To-Disk capability with minimum overhead, a program should
  110. be "unitized/encapsulated" (per ExecSWAP.DOC).  If the unitize switch
  111. is active ("/U+"), this unit is created in addition to the main
  112. program.  It contains a single procedure, named "GO", which is called
  113. by the main program.  If overlays are active, this unit is overlaid.